package server;

import javax.servlet.ServletException;
import java.io.IOException;
import java.util.List;

/*
管道接口,调用管道的invoke方法后，管道会依次调用所有阀的invoke方法,最会调用基础阀的invoke方法
 */
/*
2023/2/28 该接口内容全部写完,后续直接使用,无需修改
by cyl
 */
public interface Pipeline {
    public void invoke(Request request, Response response) throws IOException, ServletException;
    //设置基础阀
    public void setBasic(Valve valve);
    //获取基础阀
    public Valve getBasic();
    //添加阀
    public void addValve(Valve valve);
    //返回所有阀(包括基本阀)
    public List<Valve> getValves();
    //删除指定阀
    public void removeValve(Valve valve);
}
